package cn.getech.data.development.controller;


import cn.getech.data.development.entity.BdpDataAssetsAlgorithmModelRules;
import cn.getech.data.development.service.IDataAssetsAlgorithmModelRulesService;
import cn.getech.data.intelligence.common.utils.R;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 数据资产模型算法规则表 前端控制器
 * </p>
 *
 * @author zzm
 * @since 2021-01-19
 */
@RestController
@RequestMapping("/bdp/dataAssetsAlgorithmModelRules")
public class BdpDataAssetsAlgorithmModelRulesController {
    @Autowired
    IDataAssetsAlgorithmModelRulesService iDataAssetsAlgorithmModelRulesService;
    /**
     * 根据模型类型id获取算法类型;
     */
    @ApiOperation("模型类型id查询算法列表")
    @GetMapping("/listAlgorithmType")
    public R listAlgorithmType(@RequestParam (required = false) String modelTypeId){
        List<BdpDataAssetsAlgorithmModelRules> dataAssetsAlgorithmModelRulesList = iDataAssetsAlgorithmModelRulesService.listAlgorithmType(modelTypeId);
        return R.okWithData(dataAssetsAlgorithmModelRulesList);
    }
}

